package com.oig.base.api.factory;

import com.oig.base.api.CountryService;
import com.oig.base.api.fallback.CountryServiceFallBackImpl;
import org.springframework.cloud.openfeign.FallbackFactory;

public class CountryServiceFallBackFactory implements FallbackFactory<CountryService> {

    @Override
    public CountryService create(Throwable cause) {
        CountryServiceFallBackImpl countryServiceFallBack = new CountryServiceFallBackImpl();
        countryServiceFallBack.setCause(cause);
        return countryServiceFallBack;
    }
}
